home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue64 / Alfresco / TstHeapU.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2000-10-22  |  657 b   |  41 lines

  1. unit TstHeapU;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   StdCtrls;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Button1: TButton;
  12.     Label1: TLabel;
  13.     procedure Button1Click(Sender: TObject);
  14.   private
  15.     { Private declarations }
  16.   public
  17.     { Public declarations }
  18.   end;
  19.  
  20. var
  21.   Form1: TForm1;
  22.  
  23. implementation
  24.  
  25. {$R *.DFM}
  26.  
  27. procedure TForm1.Button1Click(Sender: TObject);
  28. var
  29.   S : string;
  30.   i : integer;
  31. begin
  32.   S := '';
  33.   for i := 1 to 100 do begin
  34.     S := S+'i'; // this will realloc more often than not
  35.     Label1.Caption := S;
  36.     Label1.Update;
  37.   end;
  38. end;
  39.  
  40. end.
  41.